package com.karrysong.blog_springboot.service;

import com.karrysong.blog_springboot.entity.Article;
import com.karrysong.blog_springboot.vo.ArticleVo;
import com.karrysong.blog_springboot.vo.Result;
import com.karrysong.blog_springboot.vo.params.ArticlePage;
import com.karrysong.blog_springboot.vo.params.ArticleParam;
import com.karrysong.blog_springboot.vo.params.PageParams;

import java.util.List;

/**
 * @ClassName: ArticleService
 * @Author: KarrySong
 * @Date: 2022/8/2 17:23
 * @Description:
 */
public interface ArticleService {

    /**
     * 分页查询
     * @param pageParams 查询参数
     * @return
     */
    List<ArticleVo> listArticlesPage(PageParams pageParams);

    Result hotArticle(int limit);

    Result newArticles(int limit);

    Result listArchives();

    Result findArticleById(Long id);

    Result listArticle(ArticlePage articlePage);

    Result publish(ArticleParam articleParam);

    void addViewCounts(Long id);

    Result searchArticleByName(String search);

    Result adminListArticle(ArticlePage articlePage);

    Result changeArticleStatus(Long id, Integer newStatus);

    Result deleteArticle(Long id);
}
